@(message: String)
@js_css={
<script type="text/javascript">
	$(document).ready(function(){
		@if(message==null || message==""){
		}else{
			prompt("@message");
		}
		$("#reg-btn").click(function(){
			var username = $("#username").val();
			var password = $("#password").val();
			var repassword = $("#repassword").val();
			var email = $("#email").val();
			var mobile = $("#mobile").val();
			var mobile_reg = /1[3-8]+\d{9}/;
			var mobile_reg1 = /^(13[0-9]{9})| (18[0-9]{9}) |(15[89][0-9]{8})$/;
			var email_reg = /\w@@\w*\.\w/;
			if(username == null || username == ""){
				prompt("用户名不能为空");
				return false;
			}
			if(username.length<5){
				prompt("用户名不能少于5位");
				return false;
			}
			if(email == null || email == ""){
				prompt("电子邮箱不能为空");
				return false;
			}
			if(!email_reg.test(email)){
				prompt("电子邮箱格式不正确");
				return false;
			}
			if(mobile == null || mobile == ""){
				prompt("手机号码不能为空");
				return false;
			}
			if(!mobile_reg.test(mobile)){
				prompt("手机号码格式不正确");
				return false;
			}
			if(password == null || password == ""){
				prompt("密码不能为空");
				return false;
			}
			if(password.length<6){
				prompt("密码不能少于6位");
				return false;
			}
			if(repassword==null||repassword==""){
				prompt("mpwd","重复密码不能为空");
				return false;
			}
			if(password != repassword){
				prompt("两次密码不一致");
				return false;
			}
			
		});
	});
</script>
}
@main("免费注册",js_css) {
<div class="col-lg-8 col-lg-offset-2 well bs-component">
	<div class="col-lg-10 col-lg-offset-1">
		<form class="form-horizontal" method="post" action="/register">
			<fieldset>
				<legend>免费注册</legend>
				<div class="col-xs-12">
					<div id="prompt" class="alert alert-dismissable alert-warning hide">
			  			<p><b></b></p>
					</div>
				</div>
				<div class="form-group">
					<label for="username" class="col-lg-2 control-label">用户名</label>

					<div class="col-lg-10">
						<input class="form-control" name="username" id="username" placeholder="最少5位" type="text">
					</div>
				</div>
				<div class="form-group">
					<label for="email" class="col-lg-2 control-label">电子邮箱</label>

					<div class="col-lg-10">
						<input class="form-control" name="email" id="email" placeholder="电子邮箱" type="text">
					</div>
				</div>
				<div class="form-group">
					<label for="mobile" class="col-lg-2 control-label">手机号码</label>

					<div class="col-lg-10">
						<input class="form-control" name="mobile" id="mobile" placeholder="手机号码" type="text" maxlength="11">
					</div>
				</div>
				<div class="form-group">
					<label for="password" class="col-lg-2 control-label">密码</label>

					<div class="col-lg-10">
						<input class="form-control" name="password" id="password" placeholder="最少6位" type="password">
					</div>
				</div>
				<div class="form-group">
					<label for="repassword" class="col-lg-2 control-label">重复密码</label>

					<div class="col-lg-10">
						<input class="form-control" name="repassword" id="repassword" placeholder="重复密码" type="password">
					</div>
				</div>
				<div class="form-group">
					<div class="col-lg-4 col-lg-offset-4">
						<button id="reg-btn" type="submit" class="btn btn-lg btn-primary">注册</button>
						<button type="reset" class="btn btn-lg btn-default">重置</button>
					</div>
				</div>
			</fieldset>
		</form>
	</div>
</div>
}
